package src;

/**
 * Created by dell on 2017/7/26.
 */
public class Apple<T> {
    private T info;
    public  Apple(){}
    public  Apple(T info){
        this.info= info;
    }

    public T getInfo() {
        return this.info;
    }
    public  void setInfo(T info){
        this.info=info;
    }

    public static void main(String[] args) {
        Apple<Character> a1=new Apple<>();
        a1.setInfo('3');
        System.out.println(a1.getInfo());
        Apple<String> apple=new Apple<>("苹果");
        System.out.println(apple.getInfo());
        Apple<Double> a2=new Apple<>(5.67);
        System.out.println(a2.getInfo());
        A1 a11=new A1();
        a11.setInfo("how are you");
        System.out.println(a11.getInfo());
        //Apple<Integer> apple1=new Apple<>(4);
    }
}
